<template>
	<view class="panel_container" v-if="showList">
		
		
		<view class="article_item" v-for="(item,index) in articleList" :key="index">
			<view class="article_img">
				<image mode="aspectFill" :src="host+'/static/banner/banner1.png'"></image>
			</view>
			<view class="article_txt">
				<view class="article_title">
					<view class="article_title_info">{{item.name}}</view>
					<view class="article_type">帮助文章</view>
				</view>
				<view class="article_author">作者：{{item.issuer}}</view>
				<view class="article_desc">{{item.name}}</view>
				<view class="article_opt">{{item.create_date}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import  parentPage from '@/common/parent-page.js';
	var _self;
	export default {
		extends:parentPage,
		name: 'ArticleList',
		props: {
			pageUrl:{
				type:String,
				default:""
			},
			dataList: {
				type: Array,
				default: function(){
					return [];
				}
			}
			
		},
		data() {
			return {
				showList:true,
				articleList:this.dataList,
				detailUrl:this.pageUrl,
			}
		},
		
		
		watch:{
			dataList(val){
				this.articleList=val;
				this.initData();
			}			 
		},
		created() {
			_self = this;
			/*this.$nextTick(() => {
			    this.initData();
			})*/
		},
		
		methods: {
			initData:function(){
				this.showList=true;				
			},
			goDetail:function(id){
				uni.navigateTo({url: this.detailUrl+"?id="+id});
			},

		}
	}

</script>

<style>
	@import 'app-article-list.css';
</style>
